package com.mdd.service.divide;

import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.domain.AlipayTradeOrderSettleModel;
import com.alipay.api.domain.AlipayTradeRoyaltyRateQueryModel;
import com.alipay.api.domain.AlipayTradeRoyaltyRelationBindModel;
import com.alipay.api.domain.AlipayTradeRoyaltyRelationUnbindModel;
import com.alipay.api.response.*;

/**
 * 分账
 *
 * @Description
 * @Author 幻速
 * @Date 2023/11/10 15:37
 **/
public interface DivideAccountService {
    /**
     * 绑定商户
     * @param model 商户信息
     * @return
     */
    AlipayTradeRoyaltyRelationBindResponse royaltyRelationBind(AlipayClient alipayClient, AlipayTradeRoyaltyRelationBindModel model) throws AlipayApiException;

    /**
     * 解除绑定人信息
     * @param alipayClient
     * @param model
     * @return
     */
    AlipayTradeRoyaltyRelationUnbindResponse royaltyRelationUnbind(AlipayClient alipayClient, AlipayTradeRoyaltyRelationUnbindModel model) throws AlipayApiException;
    /**
     * 商户分账
     * @param model
     * @return
     */
    AlipayTradeOrderSettleResponse tradeOrderSettle(AlipayClient alipayClient,AlipayTradeOrderSettleModel model) throws AlipayApiException;

    /**
     * 交易分账查询
     * @param alipayClient
     * @param model
     * @return
     */
    AlipayTradeRoyaltyRateQueryResponse royaltyRateQuery(AlipayClient alipayClient, AlipayTradeRoyaltyRateQueryModel model) throws AlipayApiException;

    /**
     * 分账比例查询
     * @param alipayClient
     * @param tradeNo
     * @return
     */
    AlipayTradeOrderSettleResponse orderOnSettleQuery(AlipayClient alipayClient, String tradeNo) throws AlipayApiException;
}
